package com.san.bigSc.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.san.base.controller.BaseController;
import com.san.bigSc.service.BigScService;
import com.san.common.utils.R;

@CrossOrigin
@Controller
@RequestMapping("/bigSc")
public class BigScController extends BaseController {

	@Autowired
	private BigScService bigScservice;

	/**
	 * 查询企业信用信息统计情况
	 * 
	 * @return
	 */
	@GetMapping("/queryCorporateCreditInformationStatistics")
	@ResponseBody
	public Map<String, Object> queryCorporateCreditInformationStatistics() {
		Map<String, Object> map = bigScservice.queryCorporateCreditInformationStatistics();
		return R.okReturnObj(map);
	}

	/**
	 * 查询企业数量统计情况
	 * 
	 * @return
	 */
	@GetMapping("/queryEnterpriseQuantityStatistics")
	@ResponseBody
	public Map<String, Object> queryEnterpriseQuantityStatistics() {
		Map<String, Object> map = bigScservice.queryEnterpriseQuantityStatistics();
		return R.okReturnObj(map);
	}

	/**
	 * 查询应用情况
	 * 
	 * @return
	 */
	@GetMapping("/queryApplicationDistribution")
	@ResponseBody
	public Map<String, Object> queryApplicationDistribution() {
		Map<String, Object> map = bigScservice.queryApplicationDistribution();
		return R.okReturnObj(map);
	}

	/**
	 * 查询行业分布数量
	 * 
	 * @return
	 */
	@GetMapping("/queryIndustryDistributionQuantity")
	@ResponseBody
	public Map<String, Object> queryIndustryDistributionQuantity() {
		Map<String, Object> map = bigScservice.queryIndustryDistributionQuantity();
		return R.okReturnObj(map);
	}

	/**
	 * 查询企业基因图谱分析
	 * 
	 * @return
	 */
	@GetMapping("/queryEnterpriseGenebook")
	@ResponseBody
	public Map<String, Object> queryEnterpriseGenebook() {
		Map<String, Object> map = bigScservice.queryEnterpriseGenebook();
		return R.okReturnObj(map);
	}

	/**
	 * 查询财务信息
	 * 
	 * @return
	 */
	@GetMapping("/queryFinancialInformation")
	@ResponseBody
	public Map<String, Object> queryFinancialInformation() {
		// TODO: 需要调整
		List<Map<String, Object>> list = bigScservice.queryFinancialInformation();
		return R.okReturnObj(list);
	}

	/**
	 * 查询区县信用排名
	 * 
	 * @return
	 */
	@GetMapping("/queryDistrictCreditRating")
	@ResponseBody
	public Map<String, Object> queryDistrictCreditRating() {
		List<Map<String, Object>> list = bigScservice.queryDistrictCreditRating();
		return R.okReturnObj(list);
	}

	/**
	 * 查询A级企业
	 * 
	 * @return
	 */
	@GetMapping("/queryALevelEnterprise")
	@ResponseBody
	public Map<String, Object> queryALevelEnterprise() {
		Map<String, Object> map = bigScservice.queryALevelEnterprise();
		return R.okReturnObj(map);
	}
	
	/**
	 * 查询预警信息
	 * 
	 * @return
	 */
	@GetMapping("/queryAlertList")
	@ResponseBody
	public Map<String, Object> queryAlertList() {
		Map<String, Object> map = bigScservice.queryAlertList();
		return R.okReturnObj(map);
	}

}
